<h3>Member Register Stats</h3>

<dl id="stat">
  <dt>All Count</dt>
  <dd><%= @members_count %></dd>
</dl>

<div class="card">
  <%= table_for(@register_group, class: 'table table-bordered table-striped') do |t| %>
    <% t.column :date, 'Date', class: 'col-8' do |x| %>
      <span><%= x.date.to_formatted_s(:short) %></span>
    <% end %>
    <% t.column :reg, 'Reg', class: 'col-10' do |x| %>
      <code class="text-info">
        <%= x.total %>
      </code>
    <% end %>
    <% t.column :rate, 'Rate', class: 'col-6' do |x| %>
      <code>
        <%= number_to_percentage(@members_count.fdiv(x.total) * 100, precision: 0) %>
      </code>
    <% end %>
  <% end %>
</div>
